"""
    接口层封装：编辑门店信息
"""

import requests


class ApiEditStore(object):
    def api_edit_store(self, url, token):
        # 定义请求头
        headers = {"Content-Type": "application/json", "Authorization": token}
        # 定义请求体

        data = {
            "address": "详细地址",
            "aisleMax": 33,
            "aisleMin": 22,
            "aislePass": 55,
            "aisleTotal": 44,
            "areaCode": "",
            "areaName": "",
            "belongTo": "agent",
            "brokerName": "门店联系人",
            "brokerPhone": "13811110000",
            "brokerPosition": "",
            "cityCode": "",
            "cityName": "",
            "countryCode": "1070000",
            "countryName": "关岛",
            "createTime": "2022-08-24 18:27:10",
            "createTimeTs": "2022-08-24T10:27:10.000+00:00",
            "customer": "null",
            "customerName": "null",
            "floorHeight": "<=5m",
            "id": 1234300012,
            "isChannelOver80cm": "true",
            "isGroundFlat": "true",
            "isNiceForRobot": "true",
            "isNoElevator": "true",
            "isNoSlope": "true",
            "language": "null",
            "latitude": 13.444304,
            "longitude": 144.793731,
            "lora": "LoRa通道",
            "macCount": "null",
            "name": "自动化门店7592编辑",
            "operationStatus": "",
            "operatorId": "null",
            "pageNum": 1,
            "pageSize": 10,
            "primaryIndustryCode": "scenes_cbd",
            "primaryIndustryName": "商业综合体",
            "provinceCode": "",
            "provinceLabel": "",
            "provinceName": "",
            "regionId": "ap-northeast-1",
            "rockoverRate": 3,
            "salesId": "null",
            "secondIndustryCode": "scenes_cbd_1",
            "secondIndustryName": "写字楼",
            "shopArea": 11,
            "shopTable": 1,
            "siteStartTime": "2022-08-22 16:08:59",
            "siteStartTimeTs": "2022-08-22T08:08:59.000+00:00",
            "sn": "",
            "status": 1,
            "statusDesc": "正常",
            "techSupport": "null",
            "techSupportUserName": "null",
            "unitPrice": 2,
            "userId": "76274c5ea988427883180a2438ca74a5",
            "waiterAvgSalary": 400,
            "waiterFlat": 21,
            "waiterPeak": 22,
            "waiterTotal": 23
        }
        # s = requests.post(url=url, headers=headers, json=data)
        # print(s.json())

        return requests.post(url, headers=headers, json=data)


# if __name__ == '__main__':
#     ApiEditStore().api_edit_store()